<!doctype html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=yes">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="SHORTCUT ICON" href="/data/img/logo/ico-B.ico">
    <title>致慧</title>
    <link href="css/default.css" type="text/css" rel="stylesheet">
    <script type="text/javascript" src="js/jquery.js"></script>
<!--    <script src="https://cdn.bootcss.com/jquery/1.4.2/jquery.min.js"></script>-->
</head>
<body>

<div id="mainDiv">
    <div id="content">
        <div id="code">
            <span class="comments">/**</span><br>
            <span class="space"><span class="comments">*2019—04-19,</span><br>
			<span class="space"><span class="comments">**/</span><br>
			Boy name = <span class="keyword">Mr</span> TANG<br>
			Girl name = <span class="keyword">Mrs</span> YANG<br>
			<span class="comments">// Fall in love river. </span><br>
			The boy love the girl;<br>
			<span class="comments">// They love each other.</span><br>
			The girl loved the boy;<br>
			<span class="comments">// AS time goes on.</span><br>
			The boy can not be separated the girl;<br>
			<span class="comments">// At the same time.</span><br>
			The girl can not be separated the boy;<br>
			<span class="comments">// Both wind and snow all over the sky.</span><br>
			<span class="comments">// Whether on foot or 5 kilometers.</span><br>
			<span class="keyword">The boy</span> very <span class="keyword">happy</span>;<br>
			<span class="keyword">The girl</span> is also very <span class="keyword">happy</span>;<br>
			<span class="placeholder"><span class="comments">// Whether it is right now</span><br>
			<span class="placeholder"><span class="comments">// Still in the distant future.</span><br>
			<span class="placeholder">The boy has but one dream;<br>
			<span class="comments">// The boy wants the girl could well have been happy.</span><br>
			<br>
			<br>
			I want to say:<br>
			Baby, I love you forever;<br>
		</span></span></span></span></span></span></div>
        <div id="loveHeart">
            <canvas id="garden" width="670" height="625"></canvas>
            <div id="words">
                <div id="messages">
                    亲爱的YANG，这是我们相爱在一起的时光。
                    <div id="elapseClock"><span class="digit">2221</span> days <span class="digit">01</span> hours <span class="digit">30</span> minutes <span class="digit">16</span> seconds</div>
                </div>
                <div id="loveu">
                    爱你直到永永远远。<br>
                    <div class="signature">-- TANG</div>
                </div>
            </div>
        </div>
    </div>
    <div id="copyright">
        <a href="http://106.12.133.206/">Copyright All Rights Reserved</a><br>
    </div>
    <div id="full-bg"></div>
</div>

<script type="text/javascript" src="js/garden.js"></script>
<script type="text/javascript" src="js/functions.js"></script>
<script type="text/javascript">
    var offsetX = $("#loveHeart").width() / 2;
    var offsetY = $("#loveHeart").height() / 2 - 55;
    var together = new Date();
    together.setFullYear(2019, 3, 19);
    together.setHours(2);
    together.setMinutes(0);
    together.setSeconds(0);
    together.setMilliseconds(0);

    if (!document.createElement('canvas').getContext) {
        var msg = document.createElement("div");
        msg.id = "errorMsg";
        msg.innerHTML = "Your browser doesn't support HTML5!<br/>Recommend use Chrome 14+/IE 9+/Firefox 7+/Safari 4+";
        document.body.appendChild(msg);
        $("#code").css("display", "none")
        $("#copyright").css("position", "absolute");
        $("#copyright").css("bottom", "10px");
        document.execCommand("stop");
    } else {
        setTimeout(function () {
            startHeartAnimation();
        }, 3000);

        timeElapse(together);
        setInterval(function () {
            timeElapse(together);
        }, 500);

        adjustCodePosition();
        $("#code").typewriter();
    }

    var imgList = ["img1", "img2", "img3", "img4", "img5", "img6" ];
    setInterval(function () {
         var imgClass = imgList[Math.floor(Math.random()*imgList.length)];
        $("#full-bg").removeClass().addClass(imgClass);
    },5000);
</script>

</body>
</html>